package com.lfz.demo.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.lfz.demo.entity.User;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.domain.Specification;

import java.util.Map;

/**
 * @author lfz
 * @date 2025/3/3 9:34
 */
public interface UserService extends IService<User> {
    Page<User> findByPage(Specification<User> spec, Pageable pageable);

    User login(String username, String password);

    void loadUserByLeftJoin(String username, Integer page, Integer limit);

    void saveUserRole(Integer uid, Integer[] ids);

    void AssignPermissionsByLoadUserIdDescOne();

    // 验证是否有该账户
    int countByUsername(String username);

    // 通过用户名查对应手机号
    String phoneByUsername(String username);

    // 通过用户名查对应姓名，身份证，住址
    Map<String, String> infoByUsername(String username);
}
